<template>
  <div>
    <input type="text" placeholder="女朋友的名字" v-model="friend.name"> 
  </div>
</template>

<script>
export default {
  data() {
    return {
      friend: {
        name:''
      }
    }
  },
  watch: {
    friend: {
      handler(newValue, oldValue) {
        console.log(newValue); 
      },
      deep: true,
      immediate: true,
    }
  }
}
</script>

<style>

</style>